#ifndef COLOR_H
#define COLOR_H

#include <SDL/SDL.h>

class Color32
{
    Uint32 _pcolor[4];

    public:
        Color32(Uint32 R=128, Uint32 G=128, Uint32 B=128, Uint32 A=128);
        Uint32 GetPixelValue(SDL_Surface* surface) const{
            return SDL_MapRGBA(surface->format,_pcolor[0],_pcolor[1],_pcolor[2],_pcolor[3]);
        };
        Uint32 R() const{
            return _pcolor[0];
        };
        Uint32& R(){
            return _pcolor[0];
        };
        Uint32 G() const{
            return _pcolor[1];
        };
        Uint32& G(){
            return _pcolor[1];
        };
        Uint32 B() const{
            return _pcolor[2];
        };
        Uint32& B(){
            return _pcolor[2];
        };
        Uint32 A() const{
            return _pcolor[3];
        };
        Uint32& A(){
            return _pcolor[3];
        };
        virtual ~Color32();
};

#endif // COLOR_H
